1. Technical Field
The present invention relates generally to an improved data processing system and, in particular, to a method and system for monitoring performance of the processor in a data processing system when an interrupt occurs. Still more particularly, the present invention relates to a method, apparatus, and computer instructions for qualifying collection of performance monitoring events by types of interrupt when interrupt occurs.
2. Description of Related Art
A typical data processing system utilizes processors to execute a set of instructions in order to perform a certain task, such as reading a specific character from the main memory. However, as the number of tasks required to be executed by the processor increases, the efficiency of the processor's access patterns to memory and the characteristics of such access become important factors for engineers who want to optimize the system.
Currently, the prior art contains mechanisms that can count occurrences of software-selectable events, such as cache misses, instructions executed, I/O data transfer requests, and the time a given process may take to execute within a data processing system. One such mechanism is a performance monitor. A performance monitor performs monitoring on selected characteristics to assist analysis of a system by determining a machine's state at a particular time. This analysis provides information of how the processor is used when instructions are executed and its interaction with the main memory when data are stored. In addition, the performance monitor may provide the amount of time that has passed between events in a processing system. The performance monitor provides counts of events that may be used by engineers to analyze system performance. This analysis may cause application code changes such as possible relocation of branch instructions and memory accesses to further optimize the performance of a system. Moreover, data may be gathered by the performance monitor on how the processor accesses the data processing system's level 1 and level 2 cache, and main memory in order to identify performance bottlenecks that are specific to a hardware or software environment.
The performance monitor described above does not provide the ability to further qualify the events that occur for a particular type of interrupt. An interrupt occurs, for example, when a device, such as a mouse or keyboard, raises an interrupt signal to notify the processor that an event has occurred. When the processor accepts an interrupt request, the processor completes its current instruction and passes the control to an interrupt handler. The interrupt handler executes an interrupt service routine that is associated with the interrupt. An interrupt may also be caused by a specific machine language operation code, for example Motorola 68000's TRAP, a product from Motorola. In this case, an unexpected software condition such as divide by zero causes the processor to store the current state, store identifying information about the particular interrupt and pass control to an interrupt handler that handles this unexpected software condition.
It would be advantageous to have an improved method, apparatus, and computer instructions for qualifying counting of events that occur while servicing interrupt requests based on the type of interrupt that has occurred.